package com.ruoyi.merchant.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 优惠券对象 coupon
 * 
 * @author 呦呦
 * @date 2025-09-22
 */
public class Coupon extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    private Long id;

    /** 优惠券发放者 */
    @Excel(name = "优惠券发放者")
    private Long source;

    /** 商家id */
    @Excel(name = "商家id")
    private Long mid;

    /** 优惠券名称 */
    @Excel(name = "优惠券名称")
    private String name;

    /** 优惠券类型 */
    @Excel(name = "优惠券类型")
    private String type;

    /** 折扣 */
    @Excel(name = "折扣")
    private Long discount;

    /** 触发金额 */
    @Excel(name = "触发金额")
    private Long triggerMoney;

    /** 优惠金额 */
    @Excel(name = "优惠金额")
    private Long preferentialMoney;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 领取数量 */
    @Excel(name = "领取数量")
    private Long size;

    /** 状态 */
    @Excel(name = "状态")
    private Long couponStatus;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setSource(Long source) 
    {
        this.source = source;
    }

    public Long getSource() 
    {
        return source;
    }

    public void setMid(Long mid) 
    {
        this.mid = mid;
    }

    public Long getMid() 
    {
        return mid;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }

    public void setDiscount(Long discount) 
    {
        this.discount = discount;
    }

    public Long getDiscount() 
    {
        return discount;
    }

    public void setTriggerMoney(Long triggerMoney) 
    {
        this.triggerMoney = triggerMoney;
    }

    public Long getTriggerMoney() 
    {
        return triggerMoney;
    }

    public void setPreferentialMoney(Long preferentialMoney) 
    {
        this.preferentialMoney = preferentialMoney;
    }

    public Long getPreferentialMoney() 
    {
        return preferentialMoney;
    }

    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }

    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }

    public void setSize(Long size) 
    {
        this.size = size;
    }

    public Long getSize() 
    {
        return size;
    }

    public void setCouponStatus(Long couponStatus) 
    {
        this.couponStatus = couponStatus;
    }

    public Long getCouponStatus() 
    {
        return couponStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("source", getSource())
            .append("mid", getMid())
            .append("name", getName())
            .append("type", getType())
            .append("discount", getDiscount())
            .append("triggerMoney", getTriggerMoney())
            .append("preferentialMoney", getPreferentialMoney())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("size", getSize())
            .append("couponStatus", getCouponStatus())
            .toString();
    }
}
